﻿function SelectAllNone() {
    var checks = document.getElementById('div_langs').getElementsByTagName('input');
    var checkcount = 0;
    for (i = 0; i < checks.length; i++) {
        if (checks[i].checked) checkcount++;
    }

    if (checkcount == checks.length)
        for (i = 0; i < checks.length; i++) {
        checks[i].checked = false;
    } else
        for (i = 0; i < checks.length; i++) {
        checks[i].checked = true;
    }
}